package com.xuhuan.demo.pattern.factory.simplefactory.pizzastore.pizza;

/**
 * @author huan.xu
 * @date 2021/10/3 21:41
 * @description 披萨
 */
public abstract class Pizza {

  protected String name;

  /**
   * 准备原材料，不同的披萨原材料不同
   */
  public abstract void prepare();

  /**
   * 烘焙
   */
  public void bake() {
    System.out.println(name + " baking");

  }

  /**
   * 切割
   */
  public void cut() {
    System.out.println(name + " cutting");
  }

  /**
   * 打包
   */
  public void box() {
    System.out.println(name + " boxing");
  }

  public void setName(String name) {
    this.name = name;
  }

}
